import Data.List (maximumBy)
import Data.Map (findMax, fromList)
import Data.Ord (comparing)

best :: Real a => [(a,b)] -> (a,b)
-- best = maximumBy (comparing fst)
best = findMax . fromList